package com.wnx.action;

import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

import org.apache.struts2.ServletActionContext;

import com.opensymphony.xwork2.ActionSupport;
import com.wnx.db.SchoolDao;
import com.wnx.entity.Menu;
import com.wnx.entity.School;
import com.wnx.service.SaleService;

public class QiuGouAction extends ActionSupport {
	public String execute(){
		SchoolDao sd = new SchoolDao();
		SaleService ss = new SaleService();
		List<School> school = sd.getAllSchool();
		List<Menu> menu = ss.getMenuAll();
		HttpServletRequest request = ServletActionContext.getRequest();
		HttpSession session = request.getSession();
		session.setAttribute("school", school);
		session.setAttribute("menu", menu);
		return SUCCESS;
		}
}
